	#Title: Programa 29				Filename: 29.s
	#Author: Chipres Castellanos Ana Maria          Date: 23 /mayo / 2017
	#Descripcion: Para cada una de las siguientes parejas de en teros, encontrar 
	#el minimo comun multiplo: 25, 645; 132,360; 192,24
	
	.arch armv6
	.eabi_attribute 27, 3
	.eabi_attribute 28, 1
	.fpu vfp
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 1
	.eabi_attribute 18, 4
	.file	"29.c"
	.text
	.align	2
	.global	min
	.type	min, %function
min:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bgt	.L2
	ldr	r3, [fp, #-8]
	b	.L3
.L2:
	ldr	r3, [fp, #-12]
.L3:
	mov	r0, r3
	sub	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	min, .-min
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Ingrese el primer numero:\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"Ingrese el segundo numero:\000"
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
.LC3:
	.ascii	"El M.C.M entre %d y %d es: %d\000"
	.text
	.align	2
	.global	main
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	stmfd	sp!, {fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r0, .L8
	bl	puts
	sub	r3, fp, #24
	ldr	r0, .L8+4
	mov	r1, r3
	bl	__isoc99_scanf
	ldr	r0, .L8+8
	bl	puts
	sub	r3, fp, #28
	ldr	r0, .L8+4
	mov	r1, r3
	bl	__isoc99_scanf
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	mov	r0, r2
	mov	r1, r3
	bl	min
	str	r0, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L5
.L7:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	ldr	r1, [fp, #-12]
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-28]
	mov	r0, r3
	ldr	r1, [fp, #-12]
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	mul	r3, r2, r3
	mov	r0, r3
	ldr	r1, [fp, #-20]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-8]
.L6:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L5:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L7
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	ldr	r0, .L8+12
	mov	r1, r2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	bl	printf
	sub	sp, fp, #4
	@ sp needed
	ldmfd	sp!, {fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Raspbian 4.9.2-10) 4.9.2"
	.section	.note.GNU-stack,"",%progbits
